package com.zyf.pojo;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.*;
import lombok.Data;
import org.apache.poi.hssf.usermodel.HSSFFont;
import org.apache.poi.ss.usermodel.*;

import java.util.Date;

@Data
// 头背景设置成红色 IndexedColors.RED.getIndex()
@HeadStyle(fillPatternType = FillPatternType.SOLID_FOREGROUND,verticalAlignment = VerticalAlignment.CENTER, fillForegroundColor = 9,horizontalAlignment = HorizontalAlignment.CENTER )
// 头字体设置成20
@HeadFontStyle(fontHeightInPoints = 16,fontName = "宋体")
@HeadRowHeight(20)
@ColumnWidth(25)
@ContentRowHeight(20)
public class User {


    @ContentFontStyle(charset = HSSFFont.DEFAULT_CHARSET,fontHeightInPoints = 11,color = 9,fontName = "Times New Roman",italic = true,underline = 1)
    @ContentStyle(fillPatternType = FillPatternType.SOLID_FOREGROUND,fillForegroundColor = 2,horizontalAlignment = HorizontalAlignment.CENTER,verticalAlignment = VerticalAlignment.CENTER)
    @ExcelProperty(value = {"2018年8月份出货表","客户"},index = 0)
    private String customName;

    @ContentFontStyle(charset = HSSFFont.DEFAULT_CHARSET,fontHeightInPoints = 12,fontName = "Times New Roman",bold = true)
    @ContentStyle(fillPatternType = FillPatternType.SOLID_FOREGROUND,fillForegroundColor = 10,horizontalAlignment = HorizontalAlignment.CENTER,verticalAlignment = VerticalAlignment.CENTER)
    @ExcelProperty(value = {"2018年8月份出货表","订单号"},index = 1)
    private String date;

    @ContentFontStyle(charset = HSSFFont.DEFAULT_CHARSET,fontHeightInPoints = 10,fontName = "Times New Roman",underline = 1)
    @ContentStyle(fillPatternType = FillPatternType.SOLID_FOREGROUND,fillForegroundColor = 52,horizontalAlignment = HorizontalAlignment.CENTER,verticalAlignment = VerticalAlignment.CENTER)
    @ExcelProperty(value = {"2018年8月份出货表","货号"},index = 2)
    private String productNo;

    @ContentFontStyle(charset = HSSFFont.DEFAULT_CHARSET,fontHeightInPoints = 10,fontName = "Times New Roman")
    @ContentStyle(fillPatternType = FillPatternType.SOLID_FOREGROUND,fillForegroundColor = 13,horizontalAlignment = HorizontalAlignment.CENTER,verticalAlignment = VerticalAlignment.CENTER)
    @ExcelProperty(value = {"2018年8月份出货表","数量"},index = 3)
    private String cnumber;

    @ContentFontStyle(fontHeightInPoints = 14,fontName = "方正姚体",bold = true,charset = HSSFFont.DEFAULT_CHARSET)
    @ContentStyle(fillPatternType = FillPatternType.SOLID_FOREGROUND,fillForegroundColor = 17,horizontalAlignment = HorizontalAlignment.CENTER,verticalAlignment = VerticalAlignment.CENTER)
    @ExcelProperty(value = {"2018年8月份出货表","工厂"},index = 4)
    private String factory;

    @ContentFontStyle(fontHeightInPoints = 12,color = 9,charset = HSSFFont.DEFAULT_CHARSET,fontName = "Times New Roman")
    @ContentStyle(fillPatternType = FillPatternType.SOLID_FOREGROUND,fillForegroundColor = 18,horizontalAlignment = HorizontalAlignment.CENTER,verticalAlignment = VerticalAlignment.CENTER)
    @ExcelProperty(value = {"2018年8月份出货表","工厂交期"},index = 5,format = "yyyy/MM/dd")
    private Date deliveryPeriod;

    @ContentFontStyle(charset = HSSFFont.DEFAULT_CHARSET,fontHeightInPoints = 12,color = 9,fontName = "Times New Roman")
    @ContentStyle(fillPatternType = FillPatternType.SOLID_FOREGROUND,fillForegroundColor = 18,horizontalAlignment = HorizontalAlignment.CENTER,verticalAlignment = VerticalAlignment.CENTER)
    @ExcelProperty(value = {"2018年8月份出货表","船期"},index = 6,format = "yyyy/MM/dd")
    private Date shipTime;

    @ContentFontStyle(charset = HSSFFont.DEFAULT_CHARSET,fontHeightInPoints = 10,fontName = "Times New Roman" )
    @ContentStyle(fillPatternType = FillPatternType.SOLID_FOREGROUND,fillForegroundColor =20,horizontalAlignment = HorizontalAlignment.CENTER,verticalAlignment = VerticalAlignment.CENTER)
    @ExcelProperty(value = {"2018年8月份出货表","贸易条款"},index = 7)
    private String tradeTerms;


    //忽略这个字段
    @ExcelIgnore
    private String ignore;



}
